<?php
namespace app\admin\validate;

use think\Validate;

class Novel extends Validate
{
    protected $rule = [
        'title' => 'require|max:30',
        'category_id' => 'require',
        'author' => 'require',
        'charge_type' => 'require',
        'cover_image' => 'require',
    ];

    protected $message = [
        'title.require' => '小说名称不能为空',
        'category_id.require' => '分类不能为空',
        'author.require' => '作者不能为空',
        'charge_type.require' => '付费类型不能为空',
        'cover_image.require' => '封面图不能为空',
    ];
}